<template>
  <!-- 角色头像和状态 -->
  <div class="character-header">
    <button class="back-btn" @click="$emit('go-back')">
      <i class="fas fa-arrow-left"></i> 返回
    </button>
    <div class="character-info">
      <div class="character-avatar">
        <i :class="character.icon"></i>
      </div>
      <div class="character-details">
        <h2>{{ character.name }}</h2>
        <div class="character-status">
          <div class="status-indicator"></div>
          {{ status }}
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { defineProps } from 'vue';
const props = defineProps({
  character: Object,
  status: String
});
</script>
<style scoped>
/* 角色头部 */
.character-header {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(10px);
  padding: 15px 20px;
  border-bottom: 1px solid rgba(74, 108, 247, 0.3);
  position: relative;
  z-index: 10;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 15px;
}

.back-btn {
  background: rgba(74, 108, 247, 0.2);
  border: 1px solid rgba(74, 108, 247, 0.4);
  border-radius: 10px;
  color: var(--text-light);
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
}

.back-btn:hover {
  background: rgba(74, 108, 247, 0.4);
  transform: scale(1.05);
}

.character-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.character-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
}

.character-details h2 {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.character-status {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.5s infinite;
}
</style>
